<?php
   $page = intval($this->uri->segment(3));
   if (!$page) {
      $page = 1;
   }
   $max_page = 50;
   $next_page = $page + 1;
   $prev_page = $page - 1;
   if ($next_page > $max_page) {
      $next_page = $max_page;
   }
   if ($prev_page < 1) {
      $prev_page = 1;
   }
?>
<!--TrueHits-->					
<iframe src="<?php echo base_url('truehitsstat.php');?>" width="0" height="0" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true"></iframe>
<div class="content bg-submain">
   <div id="submain_prev" class="submain-prev" onclick="javascript:call_submain('<?php echo $this->uri->segment(2);?>', '<?=$prev_page;?>', '', 'prev')"><img src="<?php echo image_asset_url('xl/btn_main_prev.png');?>" /></div>
   <div id="submain_next" class="submain-next" onclick="javascript:call_submain('<?php echo $this->uri->segment(2);?>', '<?=$next_page;?>', '', 'next')"><img src="<?php echo image_asset_url('xl/btn_main_next.png');?>" /></div>
   <div class="vspace-27"></div>
      <div class="submain-name">
	  	<?php if($this->uri->segment(2) == 6):?>
			สัมภาษณ์ศิลปิน
		<?php elseif($this->uri->segment(2) == 4):?>
			คลิปคอนเสิร์ต
		<?php elseif($this->uri->segment(2) == 3):?>
			คลิปเบื้องหลัง
		<?php else:?>
			มิวสิควีดีโอ
		<?php endif;?>
      </div>
      <div class="submain-item">
         <div class="item-lists">
		 	<?php foreach($dataVideoList as $key => $value):?>
                <a href="<?php echo base_url('play/'.$value->video_id.'-'.seo_url($value->video_name));?>">
                   <div class="item-list" id="submain_item_list_<?php echo ($key+1);?>">
                      <div class="item-image">
							<?php echo exec_image(array(
								'folder' => 'video',
								'dimension' => '228x148',
								'file_name' => @$value->video_thumb_name.'.'.@$value->video_thumb_ext,
								'alt' => ''.$value->video_name.'',	
								'title' => ''.$value->video_name.''	
								)
							);?>
                      </div>
                      <div class="item-name">
                         <?php echo $value->video_name;?>
                      </div>
                   </div>
               </a>
			<?php endforeach;?>
             <div class="clear"></div>
          </div>
      </div>
</div>